﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.DAL;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.BUS;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.VO;
using System.Data;

namespace Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.BUS
{
    class UserBusHDBan
    {
        private HDBan HDX;

        public UserBusHDBan()
        {
            HDX = new HDBan();
        }

        public bool Insert(UserVOHDBan obj)
        {
            return HDX.Insert(Convert.ToInt32(obj.MANHANVIEN),Convert.ToInt32(obj.MAKHACHHANG),obj.NGAYLAP);
        }

        public bool Update(UserVOHDBan obj)
        {
            return HDX.Update(Convert.ToInt32(obj.MAHOADONBAN), Convert.ToInt32(obj.MANHANVIEN), Convert.ToInt32(obj.MAKHACHHANG),obj.NGAYLAP);
        }

        public bool Delete(UserVOHDBan obj)
        {
            return HDX.Delete(obj.MAHOADONBAN);
        }

        public DataTable SelectAllTable()
        {
            return HDX.SelectAll();
        }

        public DataTable SelectID(int MaHDBan)
        {
            return HDX.SelectID(MaHDBan);
        }
        
    }
}
